<?php
class Model_Post
{
    protected $title;
    
    protected $content;
    
    public function setTitle($title)
    {
        $this->title = $title;
    }
    
    public function setContent($content)
    {
        $this->content = $content;
    }
    
    public function save()
    {
        $sql = "insert into `posts` (`id`, `title`, `content`) values (NULL, '%s', '%s')";
        
        $dbHandle = Show_Db_Handle::get('test');
//        $dbHandle = Show_Db_Handle::getHandle('mysqli');
        $sql = sprintf($sql, $dbHandle->escape($this->title), $dbHandle->escape($this->content));
        return $dbHandle->query($sql);
    }
}
?>